(function() {
	GameSwipe = function(rpc) {
		this.rpc = rpc;
		this.is_background = false;
	};
	
	GameSwipe.prototype = {
		start : function(is_background) {
		    $("#swipe").bind('swipeleft swiperight swipedown swipeup', this.swipe.bind(this));
		},
		stop : function() {
			$("#swipe").unbind('swipeleft swiperight swipedown swipeup', this.swipe.bind(this));
		},
		show : function() {
			$("#screen_game_swipe").show();
		},
		hide : function() {
			$("#screen_game_swipe").hide();
		},
		swipe : function(event, data) {
			event.stopImmediatePropagation();
			this.rpc.send_swipe_event(event.type);
		}
	};
})();